Test FAMS on 5D data

Contents

randomize data

max_uniform=100;

vect1 = rand(1000,5)*max_uniform; % uniform

sigma2=[0.1,0.3,0.1,0.3,0.2];
mu2=[70,60,70,55,89];
vect2 = randn(120,5)*max_uniform/10;
vect2 = vect2.*repmat(sigma2,size(vect2,1),1)+repmat(mu2,size(vect2,1),1);

sigma3=[0.1,0.3,0.1,0.3,0.2];
mu3=[20,10,15,55,9];
vect3 = randn(100,5)*max_uniform/10;
vect3 = vect3.*repmat(sigma3,size(vect3,1),1)+repmat(mu3,size(vect3,1),1);

data=[vect1;  vect2; vect3];

run FAMS

[modes, p_modes, w_modes]=fams(data,20,15,200,'5Ddata','res/');
Load data points from matlab ...done
RunFAMS with res/pilot_200_5Ddata.txt ...
Running FAMS with K=20 L=15
 Run pilot adaptive...load bandwidths...done.
 Start MS iterations..........done.
 Join Modes with adaptive h/2, min pt=40, jump=1
            pass 1.done
            pass 2..........nrel 2
0 0
1 1
done
Save convergence points   ...done
Save joined convergence points ...done
Save indicies of modes  ...done
FAMS done.

view results

p_modes


% % here the results of meanshift_Euclidian function
% % the first two vectors in <res> matrix - view like <mu2> and <mu3> vectors
% % [res, num_rows,mean_vals,data_group, sample_num ] =meanshift_Euclidian(data,0.1);
% %>> res(1:4,:)
% % ans =
% %    70.0758   59.9020   70.0746   54.5983   88.6178
% %    19.8981   10.0129   14.9481   55.1258    9.3043
% %    87.8244   37.2915   64.2528   58.1243   37.1069
% %    41.5967   27.2727   49.5976   19.0590   12.5807
% % >> size(res)
% % ans =
% %    535     5
% % >> num_rows(1:15,:)
% % ans =
% %    126
% %    107
% %     14
% %     11
% %
% % ===========================================
% % >> ans =
% %    546     5
% % ans =
% %    69.9826   59.7245   70.1298   54.9041   89.0960
% %    20.0367    9.7626   15.0001   55.1254    9.0817
% %    72.1779   16.1155   43.0180   51.8788   81.5878
% %    18.3489   57.1178   72.5199   35.9218   50.6380
% % ans =
% %    127
% %    100
% %     14
% %     14
p_modes =
          140       69.994       59.828       70.092       55.548       88.905
          135        19.98       10.137       15.159       55.244       8.9565